package com.gzx.asr.modular.media.mapper;

import com.gzx.asr.modular.media.entity.GzxHtCallReceiptBusiness;
import com.gzx.asr.modular.media.vo.GzxHtCallReceiptBusinessVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import vip.xiaonuo.common.mapper.BaseMapperPlus;

import java.util.List;

/**
 * @author xbl
 */
@Mapper
public interface GzxHtCallReceiptBusinessMapper extends BaseMapperPlus<GzxHtCallReceiptBusiness, GzxHtCallReceiptBusinessVo> {

    //每次按照最大id扫描出100条
    @Select(value = {"<script>",
            "select id,call_id callId,file_url fileUrl,connect_time connectTime from gzx_ht_call_receipt_business " +
                    "WHERE id > ${maxVoiceId} " +
                    "and file_url is not NULL " +
                    "limit 10",
            "</script>"})
    List<GzxHtCallReceiptBusinessVo> getVoiceByMaxId(int maxVoiceId);
}
